<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:f="http://java.sun.com/jsf/core">
    <head>
        <title>Ignored</title>
    </head>

    <ui:composition template="/WEB-INF/template/template.xhtml">
        <ui:define name="content">
            <h:form>
                <div align="center">
                    <h:panelGrid columns="3" border="1">
                        <h:column>
                            <h:outputText value="#{tekster.og}"/>
                        </h:column>
                        <h:column>
                            <h:inputText required="true" requiredMessage="#{tekster.req_og}" maxlength="5" value="#{rb.b.og}" id="og">
                                <f:validateDoubleRange for="og" maximum="1.2" minimum="0.8"/>
                            </h:inputText>
                        </h:column>
                        <h:column>
                            <h:message for="og"/>
                        </h:column>
                        <h:column>
                            <h:outputText value="#{tekster.fg}"/>
                        </h:column>
                        <h:column>
                            <h:inputText required="true" requiredMessage="#{tekster.req_og}" maxlength="5" value="#{rb.b.fg}" id="fg">
                                <f:validateDoubleRange for="fg" maximum="1.200" minimum="0.800"/>
                            </h:inputText>
                        </h:column>
                        <h:column>
                            <h:message for="fg"/>
                        </h:column>
                        <h:column>
                            <h:outputText value="Prosent blir"/>
                        </h:column>
                        <h:column>
                            <h:outputText value="#{rb.finnProsent()}" id="pros">
                                <f:convertNumber pattern="0.00"/>
                            </h:outputText>
                        </h:column>
                        <h:column>
                            <h:message for="pros"/>
                        </h:column>
                        <h:column>
                            <h:commandButton value="Regn ut!" action="/xhtml/funk/pros.xhtml"/>
                        </h:column>
                        <h:column>
                            <h:outputText value="Antall kalorier pr 0.33L"/>
                        </h:column>
                        <h:column>
                            <h:outputText value="#{rb.beregnCalAlk()}"/>
                        </h:column>
                    </h:panelGrid>
                </div>
            </h:form> 
        </ui:define>
    </ui:composition>
</html>